<?php

	session_start();
	require_once('../config.php');
	include_once("../database/DataBase.php");
	include_once("function.php");

	$cid = $_POST["cid"];
	$category_name = $_POST["category_name"];
	
	$database = New DataBase();
	$database->open_connection();
	$result = $database->updateCompanyCategory($cid,$category_name);
	
	if(!is_null($result)){
		$database->LogAction($_SESSION["login_id"], "Update", "Update Company Category from ".getIpAddress());
		echo "true";
	}
	else{
		echo "fail";
	}
	
	$database->close_connection();
?>
